﻿from flask import Flask, g, render_template, request,flash,redirect,url_for,Blueprint
import pymysql,json,datetime

front_blue = Blueprint('front',__name__)

@front_blue.route('/')
def index():
    return '''<h1>Hello World</h1>
			<br/>
			<a href="login">login</a>
			'''

@front_blue.route('/hello')
# def hello():
    # return '''<h1>Hello World '''+'''</h1>
			# <br/>
			# <a href="login">login</a>
			# '''
@front_blue.route('/hello/<name>')
def helloname(name=None):
    return '''<h1>Hello World '''+str(name)+'''</h1>
			<br/>
			<a href="login">login</a>
			'''
    # return render_template('hello.html', name=name)
#http://127.0.0.1:5000/url?text=sdf&a=4
@front_blue.route('/url')
def hellourl():
	text = request.args.get('text')
	a = request.args.get('a')
	return 'hello '+'   text:'+text+'   a:'+str(a)